package arc;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class ExitListener extends WindowAdapter {
    private final Main app;
    public ExitListener(Main app)
    {
        this.app = app;
    }
    @Override
    public void windowClosing(WindowEvent event) {
        app.stop();
        System.exit(0);
    }
}